#ifndef DBTOOLPANEL_H
#define DBTOOLPANEL_H

#include "DBTool_GUI.h"
#include "JsonWrapper.h"
#include "RptStruct.h"
#include "D:\Users\Sean\Projects\TuxMon\TuxSpy\TuxSpy\DBWrapper.h"
//#include "ExportExcel.h"

class DBToolPanel : public MainPanel
{
public:
	DBToolPanel( wxWindow* parent );
	~DBToolPanel();

	void SetDBFile( wxString fileName );

private:
	void OnOK( wxCommandEvent& event );
	void OnBtnRun( wxCommandEvent& event);
	void OnListItemSelected( wxListEvent& event );

	int InitControl();
	void UpdateControl();
	int ParserDB();
	void DoAnalyzing(wxString rectime1, wxString rectime2);
	int CreateReportDir();

	DECLARE_EVENT_TABLE();

private:
	wxArrayString strRecTimeArray;
	wxInt32 nRecInterval[2];
	wxString strDatabaseFile;
	wxString strRptDir;
	int tableType;
	CDBWrapper dbWrapper;
	CJsonWrapper jsonWrapper;
};

#endif //DBTOOLPANEL_H